package com.tn.rtdata;

import java.io.Serializable;
import java.util.Collection;

/**
* The listen interface implemented to receive fill event callbacks.
*/
public interface FillListener<T> extends Serializable
{
  /**
   * Called when this <code>FillListener</code> is first added to a<code>Fill</code>.
   */
  public void fillInitialized(String eventId, Collection<T> fillEntries);

  /**
   * Called when the <code>Fill</code> this <code>FillListener</code> is associated with is reset.
   */
  public void fillReset(String eventId);

  /**
   * Called when the <code>newEntry</code> is added to a <code>Fill</code>.
   */
  public void entryAdded(String eventId, T newEntry);

  /**
   * Called when the <code>oldEntry</code> is removed from a <code>Fill</code>.
   */
  public void entryDeleted(String eventId, T oldEntry);

  /**
   * Called when the <code>newEntry</code> is updated in a <code>Fill</code> replacing the <code>oldEntry</code>.
   */
  public void entryUpdated(String eventId, T newEntry, T oldEntry);
}
